import 'dart:html';

import 'package:flutter/material.dart';
import 'package:rainflutter/Tools/navigation_bar.dart';
import 'package:rainflutter/config/style.dart';

class ActivityDetail extends StatefulWidget {
  const ActivityDetail({Key key}) : super(key: key);

  @override
  _ActivityDetailState createState() => _ActivityDetailState();
}

class _ActivityDetailState extends State<ActivityDetail>
    with SingleTickerProviderStateMixin {
  @override
  Widget build(BuildContext context) {

    throw UnimplementedError();
  }
}

// class _ActivityDetailState extends State<ActivityDetail>
//     with SingleTickerProviderStateMixin {
//   AnimationController _controller;
//   VideoPlayerController _videoController;

//   @override
//   void initState() {
//     super.initState();
//     _controller = AnimationController(vsync: this);
//     _videoController = VideoPlayerController.network(
//         'https://flutter.github.io/assets-for-api-docs/assets/videos/bee.mp4')
//       ..initialize().then((_) {
//         // Ensure the first frame is shown after the video is initialized, even before the play button has been pressed.
//         setState(() {});
//       });
//   }

//   @override
//   void dispose() {
//     super.dispose();
//     _controller.dispose();
//   }

//   @override
//   Widget build(BuildContext context) {
//     return Scaffold(
//         appBar: NavigationBar('详情', showLine: false),
//         body: Padding(
//           padding: const EdgeInsets.all(16.0),
//           child: CustomScrollView(slivers: [
//             SliverToBoxAdapter(
//                 child: Column(children: [
//               Text('喜报式实时成交额不见了！今年双11电商巨头战报变冷静',
//                   style: TextStyle(
//                       color: EsColors.Title,
//                       fontSize: EsSizes.MD,
//                       fontWeight: EsFontWeights.Normal)),
//               SizedBox(height: 8),
//               Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
//                 Text('澎湃新闻',
//                     style: TextStyle(
//                         color: EsColors.Content,
//                         fontSize: EsSizes.SM,
//                         fontWeight: EsFontWeights.Normal)),
//                 Text('发布时间: 2021年11月11日18:48',
//                     style: TextStyle(
//                         color: EsColors.Content,
//                         fontSize: EsSizes.SM,
//                         fontWeight: EsFontWeights.Normal)),
//               ]),
//               Center(
//                 child: _videoController.value.isInitialized
//                     ? AspectRatio(
//                         aspectRatio: _videoController.value.aspectRatio,
//                         child: VideoPlayer(_videoController),
//                       )
//                     : Container(),
//               ),
//               Visibility(child: SizedBox())
//             ]))
//           ]),
//         ),
//         floatingActionButton: FloatingActionButton(
//           onPressed: () {
//             setState(() {
//               _videoController.value.isPlaying
//                   ? _videoController.pause()
//                   : _videoController.play();
//             });
//           },
//           child: Icon(
//             _videoController.value.isPlaying ? Icons.pause : Icons.play_arrow,
//           ),
//         ),
//         backgroundColor: Colors.white);
//   }
// }
